<template>
  <el-card class="titleCard" shadow="never">
    <el-form
      :inline="true"
      class="formInline"
      label-width="auto"
    >
      <el-form-item label="活码标题:">
        {{title.activity_name}}
      </el-form-item>
      <el-form-item label="创建人:">
        {{title.created_user}}
      </el-form-item>
      <el-form-item label="创建时间:">
        {{title.created_at}}
      </el-form-item>
      <el-form-item label="有效时间:">
        <span v-if="title.period_type == 1">永久</span>
        <p v-else>{{title.begin_date }} - {{ title.end_date}}</p>
      </el-form-item>
      <el-form-item label="状态:">
        <span>{{title.status_name}}</span>
      </el-form-item>
      <el-form-item label="提前结束时间:">
        {{title.real_end_date ? title.real_end_date : '--'}}
      </el-form-item>
    </el-form>
  </el-card>
</template>

<script  setup lang="ts">
const props = defineProps(['title'])
</script>

<style   lang="scss" scoped>
.titleCard {
  padding: 0;
  margin-bottom: 16px;
}
.formInline {
  .el-form-item {
    margin-bottom: 0px;
  }
}
</style>